import React from 'react';
import BraftEditor from 'braft-editor';
import FileUpload from '@/components/Custom/FileUpload';
import { transformFileList } from '../../../utils';

const RecordDetailHunt = ({ data }) => (
    <>
        <div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
            主题：
            <div className="bf-container" style={{ padding: 8, flex: 1, minHeight: 32 }}>
                {data?.channelRecruitSubject}
            </div>
        </div>
        <BraftEditor
            controls={[]}
            readOnly
            contentStyle={{ height: 600 }}
            style={{
                marginBottom: 16
            }}
            value={BraftEditor.createEditorState(data?.channelRecruitContent || null)}
        />
        <div style={{ marginBottom: 50 }}>
            <FileUpload
                value={data?.channelRecruitAttachmentList ? transformFileList(data?.channelRecruitAttachmentList) : {}}
                disabled
            >
                附件：
            </FileUpload>
        </div>
    </>
);

export default RecordDetailHunt;
